﻿@model IEnumerable<BLL.Model.Menu.MenuInfo>
@{
    Layout = null;
}
<script type="text/javascript">
    $().ready(function () {
        $("#accordion").accordion({
            autoHeight: false,
            navigation: true,
            navigationFilter: function () {
                var locationHref = location.href;
                var sidebarHref = this.href;
                return locationHref.substring(0, sidebarHref.length).toLowerCase() == sidebarHref.toLowerCase();
            }
        });
    });
</script>
<div id="accordion" style="text-align: left; width: 100%;">
    <h3>
        <a href="#">申请管理</a>
    </h3>
    <div>
        <div>
            @Html.ActionLink("申请列表", "Index", "Apply")
        </div>
    </div>
    <h3>
        <a href="#">数据中心</a>
    </h3>
    <div>
        @foreach (var m in Model)
        {
            <div>
                @if (m.OpenNewWindow)
                {
                    <a href="@m.Href" target="view_window">@m.Name</a>
                }
                else
                {
                    <a href="@m.Href">@m.Name</a>
                }
            </div>
            <div style="height: 5px">
            </div> 
        }
    </div>
    @*-------------------------------------------------------------------------------------------------------*@
    @if (User.IsInRole("admin"))
    { 
        <h3>
            <a href="#">基础数据管理</a>
        </h3>
        <div>
            <div>
                @Html.ActionLink("操作系统管理", "Index", "OperatingSystem")
            </div>
            <div style="height: 5px">
            </div>
            <div>
                @Html.ActionLink("数据中心管理", "Index", "Menu")
            </div>
        </div>
    }
@*-------------------------------------------------------------------------------------------------------*@
    @if (User.IsInRole("admin"))
    {
        <h3>
            <a href="#">用户管理</a>
        </h3>
        <div>
            <div>
                @Html.ActionLink("用户管理", "Index", "User")
            </div>
            <div style="height: 5px">
            </div>
        </div>
    }
</div>
